package com.bridgeintelligent.tag.engine.mvc.service;

import java.math.BigDecimal;

/**
 * @description
 * @author: grp 2020-10-13 10:41
 **/
public class TermsUtils {
    public static String getPercent(long sub,long total){
        if(total==0){
            return "0%";
        }
        return new BigDecimal(sub*100d/total).setScale(2,BigDecimal.ROUND_UP).toString()+"%";
    }
}
